import service from "@/utils/fetch";
const post = {
  //查询优惠券分页
  coupon_list(params) {
    return service({
      method: "get",
      params,
      url: "/api/coupon/"
    });
  },

  // 新增优惠券
  coupon_add(params) {
    return service({
      method: "post",
      data: params,
      url: "/api/coupon/"
    });
  },

  // 编辑优惠券
  coupon_edit(params) {
    return service({
      method: "put",
      data: params,
      url: "/api/coupon/"
    });
  },

  // 查询优惠券详情
  coupon_detail(id) {
    return service({
      method: "get",
      url: `/api/coupon/${id}`
    });
  },

  // 删除优惠券
  // coupon_delete(id) {
  //   return service({
  //     method: "delete",
  //     url: `/api/coupon/${id}`
  //   });
  // },
};

export default post;
